package br.ufpb.AlgoritmosEstrutura.atividade1;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.LinkedList;
import java.util.List;
import java.util.StringTokenizer;

import javax.swing.JOptionPane;

public class ArvoreMin{
	
	   public static void main(String [] args){
	   File file = new File("steinb"+ args[0] +".txt");
	   String line;
	   int n, m, p1, p2, c;
	   List ruas = new LinkedList ();
	
	   if(!file.exists()){  
           JOptionPane.showMessageDialog(null, "O Arquivo não foi encontrado");
		   System.exit(-1);  
       }  
	   try{ 
	      BufferedReader in = new BufferedReader(new FileReader(file));
	      if((line = in.readLine()) != null){
		     StringTokenizer token = new StringTokenizer (line, " ");
		     n = Integer.parseInt(token.nextToken());
		     m = Integer.parseInt(token.nextToken());
		     while((line = in.readLine()) != null){
		    	 token = new StringTokenizer(line, " ");
		    	 p1 = Integer.parseInt(token.nextToken());
		    	 p2 = Integer.parseInt(token.nextToken());
		    	 c = Integer.parseInt(token.nextToken());
		     }
	      }
	   }catch (Exception e){
		   e.printStackTrace();
		   e.getMessage();
	   }
	}
}
